package com.scuec.tourismwebsite.mapper;

import com.scuec.tourismwebsite.entity.UserFocus;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserFocusMapper {
    @Select("SELECT * FROM user_focus where focused_id=#{focused_id} and user_id=#{user_id}")
    public List<UserFocus> getUserFocus(@Param("focused_id") Integer focused_id, @Param("user_id") Integer user_id);

    @Insert("INSERT INTO user_focus (focused_id, user_id) VALUES (#{focused_id},#{user_id})")
    public Integer insertUserFocus(@Param("focused_id") Integer focused_id,@Param("user_id") Integer user_id);

    @Delete("DELETE FROM user_focus where focused_id=#{focused_id} and user_id=#{user_id}")
    public Integer deleteUserFocus(@Param("focused_id") Integer focused_id,@Param("user_id") Integer user_id);

}
